package framework.ai;

import static org.junit.Assert.*;
//import gamemodule.game.Othello;

import org.junit.Test;

public class ReversiAITest {
	ReversiAI test = new ReversiAI();
	
	@Test
	public void test() {
			int best = 0;
			int cp = test.getCurrentPlayer();
			int[][] gameBoard = test.board;
			this.showBoard(gameBoard);
			
			gameBoard = test.place(gameBoard, 26, cp);
			
			this.showBoard(test.board);
			
			test.currentPlayer = test.getOpponent();
			
			cp = test.getCurrentPlayer();
			best = test.getBestMove(cp);
			System.err.println("best " + best);
			gameBoard = test.place(gameBoard, best , cp);
			
			this.showBoard(gameBoard);
			test.currentPlayer = test.getOpponent();
			
			cp = test.getCurrentPlayer();
			best = test.getBestMove(cp);
			System.err.println("best " + best);
			gameBoard = test.place(gameBoard, best , cp);
			
			this.showBoard(gameBoard);
			
	}
	
	private void showBoard(int[][] gameBoard){
		String board = "";
		for (int x = 0; x < test.board.length; x++){
			for (int y = 0; y < test.board.length; y++){
				board += gameBoard[x][y] + " ";
			}
			board += "\n";
		}
		System.out.println(board);
	}

}
